package com.javasea.web.httpclient.retrofit;

import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import retrofit2.http.GET;
import retrofit2.http.Query;

import java.util.Map;

/**
 * 接口必须使用@RetrofitClient注解标记！
 * 定义http接口
 */
@RetrofitClient(baseUrl = "${retrofit.baseUrl}", errorDecoder = MyErrorDecoder.class)
public interface RetrofitHttpApi {

    @GET("areas/bound/100000_full.json")
    Map<String, Object> getAreas(@Query("id") Long id);

    @GET("testException2")
    Map<String, Object> testException();
}
